project(TestKernel)

# 设置策略CMP0091为NEW，新策略 用于MT/MD等编译选项的配置
if(POLICY CMP0091)
    cmake_policy(SET CMP0091 NEW)
endif(POLICY CMP0091)

add_library(${PROJECT_NAME} SHARED
    Kernel.cpp
    SharedData.h
    AxisManager.h
    AxisManager.cpp
    Driver/DriverModel.cpp
    Driver/DriverModel.h
    Driver/DriverStateMachine.h
    Driver/DriverData.h
    Driver/DriverData.cpp
    Axis/AxisStateMachine.h
    Axis/AxisModel.h
    Axis/AxisModel.cpp
)

target_link_libraries(${PROJECT_NAME}
    PUBLIC LinkControl_x64
    sml::sml
)

# 设置MT/MTd
set_property(TARGET ${PROJECT_NAME} PROPERTY
    MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")